package com.sl.au.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.sl.au.entity.MyMoneyType;

@Transactional(readOnly = true)
public interface MyMoneyTypeRepository extends JpaRepository<MyMoneyType, String>{
	@Query(" select a from MyMoneyType a where a.myMoneyId=?1")
	Page<MyMoneyType> getMoneyType(String id, Pageable pageable);
	
	@Query(" select count(*) from MyMoneyType a where a.myMoneyId=?1")
	long getCount(String id);
}
